//获取坐标
var village_LBS = function (that) {
  wx.getLocation({
    type: 'gcj02',//wgs84  gcj02
    success: function (res) {
      console.log(res);
      that.setData({
        latitude: res.latitude,
        longitude: res.longitude
      });
    },
  })
}

//初始化地址
var init_district = function (that) {
  return [
    { "dis_id": 1, "latitude": "2342343", "latitude": "sdfdsfs", "dis_name": "富通好旺角" },
    { "dis_id": 2, "latitude": "2342343", "latitude": "sdfdsfs", "dis_name": "宝体中心" },
    { "dis_id": 3, "latitude": "2342343", "latitude": "sdfdsfs", "dis_name": "西城上筑" },
    { "dis_id": 4, "latitude": "2342343", "latitude": "sdfdsfs", "dis_name": "壹方中心" }
  ];
}

var banner_list = function () {
  return [{
    "banner_id": 1,
    "banner_img": "../../images/24213.jpg"
  },
  {
    "banner_id": 2,
    "banner_img": "../../images/24280.jpg"
  },
  {
    "banner_id": 3,
    "banner_img": "../../images/24223.jpg"
  }
  ];
}

//分类
var init_type = function () {
  return [
    {
      "type_id": 1,
      "type_name": "生活类",
      "type_source_img": "../../images/life.png"
    },
    {
      "type_id": 2,
      "type_name": "工具类",
      "type_source_img": "../../images/tool.png"
    },
    {
      "type_id": 3,
      "type_name": "出行类",
      "type_source_img": "../../images/travel.png"
    },
    {
      "type_id": 4,
      "type_name": "儿童类",
      "type_source_img": "../../images/child.png"
    },
    {
      "type_id": 5,
      "type_name": "其他类",
      "type_source_img": "../../images/other.png"
    }
  ];
}

//热门商品
var host_data = {
  "code": 200,
  "data": [
    {
      "product_id": 1,
      "product_name": "选择 Kindle 而不是纸质书的原因是什么？",
      "product_price": 23.00,
      "product_img": "../../images/product/icon1.jpeg",
      "product_desc": "选择 Kindle 而不是纸质书的原因是什么？"
    },
    {
      "product_id": 2,
      "product_name": "金刚和地方",
      "product_price": 40.00,
      "product_img": "../../images/product/icon9.jpeg",
      "product_desc": "选择 Kindle 而不是纸质书的原因是什么？"
    },
    {
      "product_id": 3,
      "product_name": "你猜地方",
      "product_price": 15.00,
      "product_img": "../../images/product/icon8.jpg",
      "product_desc": "选择 Kindle 而不是纸质书的原因是什么？"
    },
    {
      "product_id": 4,
      "product_name": "家附近地方",
      "product_price": 23.00,
      "product_img": "../../images/product/icon1.jpeg",
      "product_desc": "选择 Kindle 而不是纸质书的原因是什么？"
    },
    {
      "product_id": 5,
      "product_name": "水电费三单位是非得失的",
      "product_price": 21.00,
      "product_img": "../../images/product/icon8.jpg",
      "product_desc": "选择 Kindle 而不是纸质书的原因是什么？"
    },
    {
      "product_id": 6,
      "product_name": "选择 Kindle 而不是纸质书的原因是什么",
      "product_price": 20.00,
      "product_img": "../../images/product/icon9.jpeg",
      "product_desc": "选择 Kindle 而不是纸质书的原因是什么？"
    }
  ]
}

//分类
var init_type = function () {
  return [
    {
      "type_id": 1,
      "type_name": "生活类",
      "type_source_img": "../../images/life.png"
    },
    {
      "type_id": 2,
      "type_name": "工具类",
      "type_source_img": "../../images/tool.png"
    },
    {
      "type_id": 3,
      "type_name": "出行类",
      "type_source_img": "../../images/travel.png"
    },
    {
      "type_id": 4,
      "type_name": "儿童类",
      "type_source_img": "../../images/child.png"
    },
    {
      "type_id": 5,
      "type_name": "其他类",
      "type_source_img": "../../images/other.png"
    }
  ];
}

//可租用产品
var product_data = {
  "code": 200,
  "data": [
    {
      "product_id": 1,
      "product_name": "你猜猜猜猜啊",
      "product_price": 23.00,
      "product_img": "../../images/product/icon1.jpeg",
      "product_num": "015555"
    },
    {
      "product_id": 2,
      "product_name": "金刚和地方",
      "product_price": 40.00,
      "product_img": "../../images/product/icon9.jpeg",
      "product_num": "454565"
    },
    {
      "product_id": 3,
      "product_name": "你猜地方",
      "product_price": 15.00,
      "product_img": "../../images/product/icon8.jpg",
      "product_num": "123121"
    },
    {
      "product_id": 4,
      "product_name": "家附近地方",
      "product_price": 23.00,
      "product_img": "../../images/product/icon1.jpeg",
      "product_num": "321321"
    },
    {
      "product_id": 5,
      "product_name": "水电费三单位是非得失的",
      "product_price": 21.00,
      "product_img": "../../images/product/icon8.jpg",
      "product_num": "534343"
    },
    {
      "product_id": 6,
      "product_name": "选择 Kindle 而不是纸质书的原因是什么选择 Kindle 而不是纸质书的原因是什么",
      "product_price": 20.00,
      "product_img": "../../images/product/icon9.jpeg",
      "product_num": "1212323"
    }
  ]
}


module.exports.village_LBS = village_LBS;
module.exports.init_district = init_district;
module.exports.init_type = init_type;
module.exports.host_data = host_data;
module.exports.product_data = product_data;
module.exports.banner_list = banner_list;
